package com.java.simple.study.juc.p2;

import com.java.simple.study.constant.Constant;
import com.java.simple.study.tool.FileReader;

/**
 * @author zhoujunlin
 * @date 2022年04月05日 17:30
 * @desc
 */
public class TestState2 {

    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(() -> {
            FileReader.read(Constant.BIG_FILE_PATH);
            FileReader.read(Constant.BIG_FILE_PATH);
        }, "t1");
        t1.start();
        Thread.sleep(1000);
        //IO阻塞的线程状态同样是RUNNABLE
        System.out.println(t1.getState());
        System.out.println("ok");
    }

}
